package com.ycl.service.impl;

import com.github.pagehelper.PageHelper;
import com.ycl.mapper.EbProductMapper;
import com.ycl.model.EbProduct;
import com.ycl.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Product实现层
 * 先implements实现ProductService接口
 */
@Service
public class ProductServiceImpl implements ProductService {
    @Autowired
    private EbProductMapper ebProductMapper;

    @Override
    public List<EbProduct> list(Integer page,Integer pageSize){
        /**
         * 商品分页实现方法
         */
        PageHelper.startPage(page,pageSize);
        List<EbProduct> ebProducts = ebProductMapper.selectByExample(null);
        return ebProducts;
    }
}
